* ======================================
* --------- Import donations -----------
* ======================================


	
	use $dta_raw/dta6/UnionMembers/W19_0078_SKATT_G1993G2018/W19_0078_SKATT_G1993G2018.dta, replace
	
	rename w19 idPers
	bysort idPers aargang: gen n = _N
	drop if n > 1 // 144 inconsistencies
	
	keep if aargang == "2015" | aargang == "2018"
	gen year = 2015 if aargang == "2015"
	replace year = 2019 if aargang == "2018" // use 2018 in place of missing 2019
	
	gen donation = 1*(gaver_frivillige_org > 0 & gaver_frivillige_org < .)
	keep donation year idPers
	
	save "$dta\ImportDonations.dta",replace

	
	